<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Inform 6 Operators</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Inform 6 Operators' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../intern.html">Inter Modules</a></li><li><a href="index.html">building</a></li><li><a href="index.html#2">Chapter 2: Blueprints</a></li><li><b>Inform 6 Operators</b></li></ul></div>
<p class="purpose">Order of precedence for Inform 6 operators, regarded as their Inter primitive equivalents.</p>

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. </b>The following table of data is essentially the same one in shown in section
6.2 of the Inform 6 Technical Manual: which operators take precedence over
which others, which are right or left associative, which are prefix or postfix,
and so on.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">;          </span><span class="comment-syntax"> which may be a </span><span class="extract"><span class="extract-syntax">*_XBIP</span></span><span class="comment-syntax"> value</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">precedence</span><span class="plain-syntax">;        </span><span class="comment-syntax"> operators with higher precedence bind more tightly</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">prefix</span><span class="plain-syntax">;            </span><span class="comment-syntax"> </span><span class="extract"><span class="extract-syntax">TRUE</span></span><span class="comment-syntax"> for prefix, </span><span class="extract"><span class="extract-syntax">FALSE</span></span><span class="comment-syntax"> for suffix, </span><span class="extract"><span class="extract-syntax">NOT_APPLICABLE</span></span><span class="comment-syntax"> for infix</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">right_associative</span><span class="plain-syntax">; </span><span class="comment-syntax"> if same operator used twice at same precedence</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">arity</span><span class="plain-syntax">;             </span><span class="comment-syntax"> how many operands the operator has: always 1 or 2</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">char</span><span class="plain-syntax"> *</span><span class="identifier-syntax">notation_c</span><span class="plain-syntax">;      </span><span class="comment-syntax"> Inform 6 syntax for this operator</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">notation</span><span class="plain-syntax">;</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure i6_operator_metadata is accessed in 1/ip and here.</li></ul>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>Do not reorder this table without reading <a href="2-i6o.html#SP6" class="internal">I6Operators::notation_to_BIP</a> below.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> </span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[] = {</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">STORE_BIP</span><span class="plain-syntax">,           </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">, </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"="</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">AND_BIP</span><span class="plain-syntax">,             </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"&amp;&amp;"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">OR_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"||"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">NOT_BIP</span><span class="plain-syntax">,             </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,           </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="string-syntax">"~~"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">EQ_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"=="</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">GT_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"&gt;"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">GE_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"&gt;="</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">LT_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"&lt;"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">LE_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"&lt;="</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">NE_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"~="</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">HAS_XBIP</span><span class="plain-syntax">,            </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"has"</span><span class="plain-syntax">,      </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">HASNT_XBIP</span><span class="plain-syntax">,          </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"hasnt"</span><span class="plain-syntax">,    </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">OFCLASS_BIP</span><span class="plain-syntax">,         </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"ofclass"</span><span class="plain-syntax">,  </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">PROPERTYEXISTS_BIP</span><span class="plain-syntax">,  </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"provides"</span><span class="plain-syntax">, </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">IN_BIP</span><span class="plain-syntax">,              </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"in"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">NOTIN_BIP</span><span class="plain-syntax">,           </span><span class="constant-syntax">3</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"notin"</span><span class="plain-syntax">,    </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">ALTERNATIVE_BIP</span><span class="plain-syntax">,     </span><span class="constant-syntax">4</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"or"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">ALTERNATIVECASE_BIP</span><span class="plain-syntax">, </span><span class="constant-syntax">4</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">""</span><span class="plain-syntax">,         </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">PLUS_BIP</span><span class="plain-syntax">,            </span><span class="constant-syntax">5</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"+"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">MINUS_BIP</span><span class="plain-syntax">,           </span><span class="constant-syntax">5</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"-"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">TIMES_BIP</span><span class="plain-syntax">,           </span><span class="constant-syntax">6</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"*"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">DIVIDE_BIP</span><span class="plain-syntax">,          </span><span class="constant-syntax">6</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"/"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">MODULO_BIP</span><span class="plain-syntax">,          </span><span class="constant-syntax">6</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"%"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">BITWISEAND_BIP</span><span class="plain-syntax">,      </span><span class="constant-syntax">6</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"&amp;"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">BITWISEOR_BIP</span><span class="plain-syntax">,       </span><span class="constant-syntax">6</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"|"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">BITWISENOT_BIP</span><span class="plain-syntax">,      </span><span class="constant-syntax">6</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,           </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="string-syntax">"~"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">LOOKUP_BIP</span><span class="plain-syntax">,          </span><span class="constant-syntax">7</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"--&gt;"</span><span class="plain-syntax">,      </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">LOOKUPBYTE_BIP</span><span class="plain-syntax">,      </span><span class="constant-syntax">7</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"-&gt;"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">UNARYMINUS_BIP</span><span class="plain-syntax">,      </span><span class="constant-syntax">8</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="string-syntax">"-"</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">POSTINCREMENT_BIP</span><span class="plain-syntax">,   </span><span class="constant-syntax">9</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,          </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="string-syntax">"++"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">POSTDECREMENT_BIP</span><span class="plain-syntax">,   </span><span class="constant-syntax">9</span><span class="plain-syntax">, </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">,          </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="string-syntax">"--"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">PREINCREMENT_BIP</span><span class="plain-syntax">,    </span><span class="constant-syntax">9</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,           </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="string-syntax">"++"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">PREDECREMENT_BIP</span><span class="plain-syntax">,    </span><span class="constant-syntax">9</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,           </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">1</span><span class="plain-syntax">, </span><span class="string-syntax">"--"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">PROPERTYARRAY_BIP</span><span class="plain-syntax">,  </span><span class="constant-syntax">10</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">".&amp;"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>
<span class="plain-syntax">    { </span><span class="constant-syntax">PROPERTYLENGTH_BIP</span><span class="plain-syntax">, </span><span class="constant-syntax">10</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">".#"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">PROPERTYVALUE_BIP</span><span class="plain-syntax">,  </span><span class="constant-syntax">12</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"."</span><span class="plain-syntax">,        </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">OWNERKIND_XBIP</span><span class="plain-syntax">,     </span><span class="constant-syntax">13</span><span class="plain-syntax">, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">2</span><span class="plain-syntax">, </span><span class="string-syntax">"&gt;&gt;"</span><span class="plain-syntax">,       </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> },</span>

<span class="plain-syntax">    { </span><span class="constant-syntax">0</span><span class="plain-syntax">,                  -1, </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">, </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">,  </span><span class="constant-syntax">0</span><span class="plain-syntax">, </span><span class="string-syntax">""</span><span class="plain-syntax">,         </span><span class="identifier-syntax">NULL</span><span class="plain-syntax"> }</span>
<span class="plain-syntax">};</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. </b>The following must be called before the above array can be used. It checks
that the numbering is right, and converts the names and signatures from <span class="extract"><span class="extract-syntax">char *</span></span>
to <span class="extract"><span class="extract-syntax">text_stream *</span></span>.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">inform6_operators_chart_prepared</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">inform6_operators_xref</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_BIPS</span><span class="plain-syntax">];</span>
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">inform6_operators_XBIP_xref</span><span class="plain-syntax">[</span><span class="constant-syntax">MAX_BIPS</span><span class="plain-syntax">];</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">I6Operators::prepare_chart</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">I6Operators::prepare_chart</span></span>:<br/><a href="2-i6o.html#SP4">&#167;4</a>, <a href="2-i6o.html#SP6">&#167;6</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">inform6_operators_chart_prepared</span><span class="plain-syntax"> == </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">inform6_operators_chart_prepared</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="constant-syntax">MAX_BIPS</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) </span><span class="identifier-syntax">inform6_operators_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] = -1;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;</span><span class="constant-syntax">MAX_BIPS</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) </span><span class="identifier-syntax">inform6_operators_XBIP_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">] = -1;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; ; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">BIP</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">MAX_BIPS</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"MAX_BIPS set too low"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> = </span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">LOWEST_XBIP_VALUE</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">HIGHEST_XBIP_VALUE</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"XBIP value out of range"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">inform6_operators_XBIP_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> - </span><span class="constant-syntax">LOWEST_XBIP_VALUE</span><span class="plain-syntax">] = (</span><span class="reserved-syntax">int</span><span class="plain-syntax">) </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">MAX_BIPS</span><span class="plain-syntax">) </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"BIP value out of range"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">inform6_operators_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">] = (</span><span class="reserved-syntax">int</span><span class="plain-syntax">) </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">notation</span><span class="plain-syntax"> = </span><span class="identifier-syntax">Str::new</span><span class="plain-syntax">();</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">WRITE_TO</span><span class="plain-syntax">(</span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">notation</span><span class="plain-syntax">, </span><span class="string-syntax">"%s"</span><span class="plain-syntax">,</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">notation_c</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>This, again, is trickier than it looks because a valid input can be either a
<span class="extract"><span class="extract-syntax">*_BIP</span></span> code or a <span class="extract"><span class="extract-syntax">*_XBIP</span></span> code:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> *</span><span class="function-syntax">I6Operators::operator_for_BIP</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">I6Operators::operator_for_BIP</span></span>:<br/><a href="2-i6o.html#SP5">&#167;5</a>, <a href="2-i6o.html#SP7">&#167;7</a>, <a href="2-i6o.html#SP8">&#167;8</a>, <a href="2-i6o.html#SP9">&#167;9</a>, <a href="2-i6o.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="2-i6o.html#SP3" class="function-link"><span class="function-syntax">I6Operators::prepare_chart</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">MAX_BIPS</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">inform6_operators_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">] &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> &amp;(</span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">inform6_operators_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">]]);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> &gt;= </span><span class="constant-syntax">LOWEST_XBIP_VALUE</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> &lt;= </span><span class="constant-syntax">OWNERKIND_XBIP</span><span class="plain-syntax">) &amp;&amp;</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">inform6_operators_XBIP_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> - </span><span class="constant-syntax">LOWEST_XBIP_VALUE</span><span class="plain-syntax">] &gt;= </span><span class="constant-syntax">0</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> &amp;(</span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">inform6_operators_XBIP_xref</span><span class="plain-syntax">[</span><span class="identifier-syntax">BIP</span><span class="plain-syntax"> - </span><span class="constant-syntax">LOWEST_XBIP_VALUE</span><span class="plain-syntax">]]);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>So now we have the outward-facing API. Here's the Inform 6 notation:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="function-syntax">I6Operators::I6_notation_for</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">I6Operators::I6_notation_for</span></span>:<br/>Ramification - <a href="2-rmf.html#SP22_4">&#167;22.4</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> *</span><span class="identifier-syntax">md</span><span class="plain-syntax"> = </span><a href="2-i6o.html#SP4" class="function-link"><span class="function-syntax">I6Operators::operator_for_BIP</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> (</span><span class="identifier-syntax">md</span><span class="plain-syntax">) ? (</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">notation</span><span class="plain-syntax">) : </span><span class="identifier-syntax">I</span><span class="string-syntax">"???"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>And the inverse of that function, from text to an operator, or 0 if none
matches. Note that we return the earliest row in the above table, if more than
one matches, and this matters for <span class="extract"><span class="extract-syntax">++</span></span> and <span class="extract"><span class="extract-syntax">--</span></span>, where the same notation is
used both for the prefix and postfix operators.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="function-syntax">I6Operators::notation_to_BIP</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">I6Operators::notation_to_BIP</span></span>:<br/>Tokenisation - <a href="2-tkn.html#SP1_3_1_4_1">&#167;1.3.1.4.1</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">text_stream</span><span class="plain-syntax"> *</span><span class="identifier-syntax">T</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><a href="2-i6o.html#SP3" class="function-link"><span class="function-syntax">I6Operators::prepare_chart</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">=0; ; </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">BIP</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">Str::eq</span><span class="plain-syntax">(</span><span class="identifier-syntax">T</span><span class="plain-syntax">, </span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">notation</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">i6_operator_chart</span><span class="plain-syntax">[</span><span class="identifier-syntax">i</span><span class="plain-syntax">].</span><span class="element-syntax">BIP</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>The arity of the operator, always 1 or 2, unless the given <span class="extract"><span class="extract-syntax">BIP</span></span> is not
an operator at all:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">I6Operators::arity</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">I6Operators::arity</span></span>:<br/>Ramification - <a href="2-rmf.html#SP23">&#167;23</a>, <a href="2-rmf.html#SP22_4">&#167;22.4</a><br/>Emitting Inter Schemas - <a href="2-eis.html#SP3_1_10_2">&#167;3.1.10.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> *</span><span class="identifier-syntax">md</span><span class="plain-syntax"> = </span><a href="2-i6o.html#SP4" class="function-link"><span class="function-syntax">I6Operators::operator_for_BIP</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> (</span><span class="identifier-syntax">md</span><span class="plain-syntax">) ? (</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">arity</span><span class="plain-syntax">) : </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. </b>Returns:
</p>

<ul class="items"><li>&#9679; <span class="extract"><span class="extract-syntax">TRUE</span></span> for a prefix operator, e.g., <span class="extract"><span class="extract-syntax">++alpha</span></span>;
</li><li>&#9679; <span class="extract"><span class="extract-syntax">FALSE</span></span> for a postfix operator, e.g., <span class="extract"><span class="extract-syntax">alpha--</span></span>;
</li><li>&#9679; <span class="extract"><span class="extract-syntax">NOT_APPLICABLE</span></span> for an infix operator, e.g., <span class="extract"><span class="extract-syntax">alpha + beta</span></span>, or for
something which is not an operator at all.
</li></ul>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">I6Operators::prefix</span><span class="plain-syntax">(</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> *</span><span class="identifier-syntax">md</span><span class="plain-syntax"> = </span><a href="2-i6o.html#SP4" class="function-link"><span class="function-syntax">I6Operators::operator_for_BIP</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> (</span><span class="identifier-syntax">md</span><span class="plain-syntax">) ? (</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">prefix</span><span class="plain-syntax">) : </span><span class="identifier-syntax">NOT_APPLICABLE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. </b>The precedence level of the operator, or infinity (near enough) if this is
not an operator at all.
</p>

<pre class="definitions code-font"><span class="definition-keyword">define</span> <span class="constant-syntax">UNPRECEDENTED_OPERATOR</span><span class="plain-syntax"> </span><span class="constant-syntax">10000</span>
</pre>
<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">I6Operators::precedence</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">I6Operators::precedence</span></span>:<br/>Ramification - <a href="2-rmf.html#SP23">&#167;23</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> *</span><span class="identifier-syntax">md</span><span class="plain-syntax"> = </span><a href="2-i6o.html#SP4" class="function-link"><span class="function-syntax">I6Operators::operator_for_BIP</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> (</span><span class="identifier-syntax">md</span><span class="plain-syntax">) ? (</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">precedence</span><span class="plain-syntax">) : </span><span class="constant-syntax">UNPRECEDENTED_OPERATOR</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. </b><span class="extract"><span class="extract-syntax">TRUE</span></span> if the operator is right associative, <span class="extract"><span class="extract-syntax">FALSE</span></span> if it is left associative;
irrelevant, of course, for unary operators.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">I6Operators::right_associative</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">I6Operators::right_associative</span></span>:<br/>Ramification - <a href="2-rmf.html#SP23">&#167;23</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">inter_ti</span><span class="plain-syntax"> </span><span class="identifier-syntax">BIP</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">i6_operator_metadata</span><span class="plain-syntax"> *</span><span class="identifier-syntax">md</span><span class="plain-syntax"> = </span><a href="2-i6o.html#SP4" class="function-link"><span class="function-syntax">I6Operators::operator_for_BIP</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">BIP</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> (</span><span class="identifier-syntax">md</span><span class="plain-syntax">) ? (</span><span class="identifier-syntax">md</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">right_associative</span><span class="plain-syntax">) : </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="2-rmf.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-bm.html">1</a></li><li class="progresscurrentchapter">2</li><li class="progresssection"><a href="2-is.html">is</a></li><li class="progresssection"><a href="2-pis.html">pis</a></li><li class="progresssection"><a href="2-tkn.html">tkn</a></li><li class="progresssection"><a href="2-rmf.html">rmf</a></li><li class="progresscurrent">i6o</li><li class="progresssection"><a href="2-eis.html">eis</a></li><li class="progresssection"><a href="2-if.html">if</a></li><li class="progresssection"><a href="2-i6a.html">i6a</a></li><li class="progresssection"><a href="2-i6se.html">i6se</a></li><li class="progresschapter"><a href="3-prd.html">3</a></li><li class="progressnext"><a href="2-eis.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

